<div class="widgets">
  <div class="row">
    <div class="col-md-12">
      <div ba-panel ba-panel-title="现有公司列表<span style='float: right; margin-top:-10px' ng-click='addUpdateItem()'><button class='btn btn-primary'>新建公司</button></span>" ba-panel-class="with-scroll">
        <div class="horizontal-scroll" style="min-height: 300px">
          <table class="table table-hover table-condensed " st-pipe="callServer" st-table="data.pageData">
            <thead>
            <tr class="sortable">
              <th class="table-id">序号</th>
              <th>公司名称</th>
              <th>英文简称</th>
              <th>公司区分</th>
              <th>联系电话</th>
              <th>创建时间</th>
              <th>操作</th>
            </tr>
            <tr>
              <th></th>
              <th>
                <input st-search="name" placeholder="查询公司名称.." style="min-width: 100px" class="input-sm form-control search-input" type="search"/>
              </th>
              <th>
                <input st-search="abbr" placeholder="查询英文简称.." style="min-width: 100px" class="input-sm form-control search-input" type="search"/>
              </th>
              <th>
                <select class="form-control" ng-model="type" st-search="type"
                        style="width: 100px">
                  <option value="">全部</option>
                  <option value="0">平台</option>
                  <option value="1">分销商</option>
                  <option value="2">厂商</option>
                </select>
              </th>
              <th></th>
              <th></th>
              <th></th>
              <th></th>
              <th></th>
            </tr>
            </thead>
            <tbody ng-show="!isLoading">
            <tr ng-repeat="item in data.pageData track by $index">
              <td class="table-id">{{(data.pageNo - 1)*20 + $index + 1}}</td>
              <td>{{item.name}}</td>
              <td>{{item.abbr}}</td>
              <td>{{{0:'平台', 1: '分销商', 2: '厂商'}[item.type]}}</td>
              <td>{{item.mobile}}</td>
              <td>{{item.createDate | amDateFormat:'YYYY-MM-DD HH:mm'}}</td>
              <td>
                <div class="buttons" style="width: 160px">
                  <button class="btn btn-info btn-xs" ng-click="addUpdateItem(item)">编辑</button>
                  <button class="btn btn-warning  btn-xs" ng-click="deleteItem(item)">{{item.delFlag == 1 ? '启用' : '禁用'}}</button>
                </div>
              </td>
            </tr>
            </tbody>
            <tbody ng-show="isLoading">
            <tr>
              <td colspan="10" class="text-center">加载中 ... </td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
              <td colspan="10" class="text-center">
                <div st-template="app/pages/support/pagination.html" st-pagination="" st-items-by-page="PAGE_SIZE" st-displayed-pages="5"></div>
              </td>
            </tr>
            </tfoot>
          </table>
          <p>共{{data.totalCount}}条。{{PAGE_SIZE}}条/页。共{{data.totalPage}}页</p>
        </div>
      </div>
    </div>
  </div>
</div>
